{extend name="common/application" /}
{block name="title"}
<title>人才培训-更多师资</title>
{/block}
{block name="css"}
<link rel="stylesheet" type="text/css" href="_CSS_/person_details.css"/>
<script src="//api.html5media.info/1.2.2/html5media.min.js"></script>
<!--[if lt IE 9]>
<script src="http://www.ijquery.cn/js/html5shiv.js"></script>
<![endif]-->
<style>
.location, .company, .level{margin-bottom:10px;min-width:120px;}
.areas{margin-top:5px;}
</style>
{/block}


{block name="navbar"}{include file="/common/navbar" /}{/block}
{block name="content"}

<!-- 主体内容 -->
<div class="main">
    <div class="mainBody normalBox clearfix" style="padding-top: 0;">
        <!--面包屑导航-->
        <div class="breadcrumb">
            <p>当前位置：
                <a href="index.html">人才培训</a> &gt;
                <a class="prevPage" href="persons.html">精英·人才</a> &gt;
                <a class="curPage" href="javascript:;">杨足明</a>
            </p>
        </div>
        <div class="sectionArea normalBox">
            <!--左侧区域-->
            <div class="leftCon fl">
                <!--人才信息-->
                <div class="personInfo">
                    <div class="userBigImg fl">
                        <a class="links" href="javascript:;">
                            <img src="_IMG_/120.png" class="icon-wapper">
                            <img src="_IMG_/male120.png" class="icon">
                        </a>
                    </div>
                    <div class="userInfo fl">
                        <span class="userName"></span>
                        <p class="position"></p>
                        <p class="location">
                            <span class="icons icon-local"></span>
                            <span class="locals"></span>
                        </p>
                        <p class="company">所在单位<span class="myCompany"></span></p>
                        <p class="level">所属库别<span class="myLevel"></span></p>
                        <br/>
                        <!--<span class="labels ml0">逻辑清晰</span>-->
                        <!--<span class="labels">效率神速</span>-->
                        <!--<span class="labels">专业性强</span>-->
                        <div class="areas"></div>
                    </div>
                </div>
                <!--主要学术-->
                <div class="academic">
                    <h4>主要学术著作及论文</h4>
                    <div class="noData">
                        <img src="_IMG_/null01.png"/>
                        <p>抱歉,暂时没有相关内容</p>
                    </div>
                    <p class="hide">
                    </p>
                </div>
                <!--任职情况-->
                <div class="office">
                    <h4>国内外学术团体任职情况</h4>
                    <div class="noData">
                        <img src="_IMG_/null01.png"/>
                        <p>抱歉,暂时没有相关内容</p>
                    </div>
                    <p>
                    </p>
                </div>
            </div>
            <!--推荐区-->
            <div class="rightCon fr">
                <!--热门课程-->
                <div class="policyInfo">
                    <h4 class="conHeader">
                        <p class="sectionName fl">
                            <span class="icons icon-hot"></span>
                            <span>推荐人才</span>
                        </p>
                        <!--<a class="readMore fr" href="javascript:;">更多<span class="icons icon-right"></span></a>-->
                    </h4>
                    <div class="conBody">
                        <ul class="infoList">

                            <!--<li class="mb0">-->
                            <!--<a class="personItem" href="persons_details.html">-->
                            <!--<div class="userImg">-->
                            <!--<img src="_IMG_/76.png" class="icon-wapper">-->
                            <!--<img src="_IMG_/female76.png" class="icon">-->
                            <!--</div>-->
                            <!--<div class="userinfo fl">-->
                            <!--<span class="username">杨足明</span>-->
                            <!--<p class="position">高级工程师</p>-->
                            <!--<div class="areas">精于电器、机械产品、医疗器械，略懂胶业，农业与科学技术产业</div>-->
                            <!--</div>-->
                            <!--</a>-->
                            <!--</li>-->
                        </ul>
                    </div>
                </div>

            </div>
        </div>

    </div>
</div>
{/block}


{block name="js"}

<script type="text/javascript">
    $(function () {
        var url = window.location.href;
        var keys = url.split("?")[1].split("&");
        var type = keys[0].split("=")[1];
        var id = keys[1].split("=")[1];
        if (type == 1) {
            $('.prevPage').attr("href", 'persons.html');
            $('.prevPage').html('精英·人才');
        } else {
            $('.prevPage').attr("href", 'teachers.html');
            $('.prevPage').html('学术·师资');
        }
        var sheet;
        if (id) {
            $.ajax({
                type: "get",
                url: "/index.php/api/talent/talent_detail",
                data: {'id': id},
                dataType: 'jsonp',
                success: function (msg) {
                    if (msg.code == 200) {
                        $(".userName").html(msg.data.talentname);
                        $(".personInfo").find(".position").html(msg.data.duties);
						if(msg.data.province == '' || msg.data.province == null){
							$(".locals").html('<span style="color:#fc9258;">暂无相关信息！</span>');
						}else{
							$(".locals").html(msg.data.province);
						}
                        if(msg.data.workplace == '' || msg.data.workplace == null){
							$(".myCompany").html('<span style="color:#fc9258;">暂无相关信息！</span>');
						}else{
							$(".myCompany").html(msg.data.workplace);
						}
                        $('.icon').attr('src', '/Images/Talent/' + msg.data.img_url);
                        var arr = msg.data.label.split(" ");
                        var label = "";
                        for (var i = 0; i < arr.length; i++) {
                            if (arr[i]) {
                                label += '<span class="labels">' + arr[i] + '</span>';
                            }
                        }
                        $(".personInfo").find('br').after(label);
                        $(".myLevel").html(msg.data.rolename);
                        $(".personInfo").find(".areas").html(msg.data.field);
                        if (msg.data.composition) {
                            $(".academic").find(".noData").addClass('hide');
                            $(".academic").find("p:eq(1)").removeClass('hide');
                            $(".academic").find("p:eq(1)").html(msg.data.composition.replace(/&lt;.*?&gt;/ig,""));
                        }
                        if (msg.data.office) {
                            $(".office").find(".noData").addClass('hide');
                            $(".office").find("p:eq(1)").removeClass('hide');
                            $(".office").find("p:eq(1)").html(msg.data.office.replace(/&lt;.*?&gt;/ig,""));
                        }
                        $('.curPage').html(msg.data.talentname);
                        // $('.curPage').attr("href",'persons_details.html?id='+msg.data.id);
                        sheet = msg.data.sheet;
                        hot_view(sheet, type);
                    }
                }
            })
        } else {
            $('.leftCon').html('<div class="academic"><div class="noData"><img src="/static/web/images/null01.png"/><p>抱歉,暂时没有相关内容</p></div></div>');
        }
    });
  

    //热门政务
    function hot_view(sheet, type) {
        $.ajax({
            type: "get",
            url: "/index.php/api/talent/random_talent",
            data: {'sheet': sheet},
            dataType: 'jsonp',
            success: function (msg) {
                var html = "";
                //$(".infoList").html('');
                if (msg.code == 200) {
                    for (var i = 0; i < msg.data.length; i++) {
                        html += '<li><a class="personItem" href="persons_details.html?type=' + type + '&id=' + msg.data[i].id + '"><div class="userImg">';
                        html += '<img src="/static/web/images/76.png" class="icon-wapper">';
                        html += '<img src="/Images/Talent/' + msg.data[i].img_url + '" class="icon"></div>';
                        html += '<div class="userinfo fl"><span class="username">' + msg.data[i].talentname + '</span>';
                        html += '<p class="position">' + msg.data[i].rolename + '</p>';
                        html += '<div class="areas moreline" limit="30">' + msg.data[i].field + '</div></div></a></li>';
                    }
                    $('.infoList').html(html);
                }
            }
        });
    }
</script>
{/block}
